namespace CSharpPro._1013;

public class demo5
{

    static void main()
    {
        Console.WriteLine("请输入一个正整数：");
        string input = Console.ReadLine();
        int digitCount = input.Length;
        Console.WriteLine($"它是 {digitCount} 位数。");
        Console.Write("逆序的各位数字为：");
        for (int i = input.Length - 1; i >= 0; i--)
        {
            Console.Write(input[i]);
        }
        Console.WriteLine();
    }
}
